$(function($, window, undefined) {
	window.wx | (window.wx = {});
	wx.overlay = function() {
		var $topDocument = $(top.document);
		var $overlay = $topDocument.find('.overlay');
		if(0 == $overlay.length) {
			$overlay = $('<div class="overlay"></div>');
			$overlay.css({
				background: 'black',
				width: '100%',
				height: '100%',
				position: 'absolute',
				'z-index': 99999999,
				opacity: 0.3
			});
		}
		
		$overlay.height($topDocument.height()).show();
	};
	wx.unOverlay = function() {
		var topDocument = $(top.document);
		topDocument.find('.overlay').hide();
	};
	

	wx.isArray = function(v) {
		return toString.apply(v) === '[object Array]';
	};

}(jQuery, window));